package com.syy.system.api.impl;

import com.syy.system.domain.dto.SmsCodeSendReqDTO;
import com.syy.system.domain.dto.SmsCodeUseReqDTO;
import com.syy.system.domain.dto.SmsCodeValidateReqDTO;
import com.syy.system.api.SmsCodeApi;
import com.syy.system.api.SmsCodeService;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;

import javax.annotation.Resource;

@Service
@Validated
public class SmsCodeApiImpl implements SmsCodeApi {

    @Resource
    private SmsCodeService smsCodeService;

    @Override
    public void sendSmsCode(SmsCodeSendReqDTO reqDTO) {
        smsCodeService.sendSmsCode(reqDTO);
    }

    @Override
    public void useSmsCode(SmsCodeUseReqDTO reqDTO) {
        smsCodeService.useSmsCode(reqDTO);
    }

    @Override
    public void validateSmsCode(SmsCodeValidateReqDTO reqDTO) {
        smsCodeService.validateSmsCode(reqDTO);
    }

}
